import App from './App'

import core from './xiluedu/core.js';

// Vue.prototype.$navBack = util.navBack;
import user from './xiluedu/user.js';
import util from './xiluedu/util.js';

// 挂载
Vue.prototype.$core = core; //core
Vue.prototype.$user = user; //user
Vue.prototype.$formatDatetime = util.formatDatetime;

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif

Vue.filter('formatTime1', function(value) {
	if (!value) return ''
	let date = new Date(value);
	const year = date.getFullYear();
	const month = date.getMonth() + 1;
	const day = date.getDate();
	const hour = date.getHours();
	const minute = date.getMinutes();
	const second = date.getSeconds();
	return [year, month, day].join("-") + " " + [hour, minute, second].join(":");
})
